from IPython.display import Image
Image(filename='split/sdgmn3_1.png')
Image(filename='split/sdgmn3_2.png')
Image(filename='split/sdgmn3_3.png')
Image(filename='split/sdgmn3_4.png')
Image(filename='split/sdgmn3_5.png')
%matplotlib inline
run SierpinskiCantorGraph.py
Image(filename='split/sdgmn3_6.png')
Image(filename='split/sdgmn3_7.png')
Image(filename='split/sdgmn3_8.png')
EXAMPLES
1. Synthetic 3-Layer Graphs in the Triangular Topology
2. Synthetic 3-Layer Graphs in the 2-Path Topology
3. Analytic 3-Layer Graphs in the Triangular Topology
4. Analytic 3-Layer Graphs in the 2-Path Topology
5. Temporal Graphs with 3 Slices
%matplotlib inline
from syntheticThreeLayerGraph import synthetic_three_level, plot_graph
n1=n2=n3=50
p1=p2=p3=0.01
q1=q2=q3=0.01
G,J,FF,DD,edgeList = synthetic_three_level(n1,n2,n3,p1,p2,p3,q1,q2,q3,no_isolates=False)
pos=plot_graph(G,J,FF,DD,n1,n2,n3,d1=1,d2=10.,d3=0.8,nodesize=50,withlabels=False,edgelist=edgeList,layout=False,b_alpha=0.25)
from threeLayerCommunityParition import create_node_comm_graph, plot_graph
broken_graph,broken_partition,npartition = create_node_comm_graph(G,J.nodes(),FF.nodes(),DD.nodes())
plot_graph(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from threeLayerConnComponentsPartition import create_node_conncomp_graph, plot_graph
broken_graph,broken_partition,npartition = create_node_conncomp_graph(G,J.nodes(),FF.nodes(),DD.nodes())
plot_graph(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from threeLayer3AttributesPartition import create_node_3attri_graph, plot_graph
r1=r2=r3=0.333
broken_graph,broken_partition,npartition = create_node_3attri_graph(G,J.nodes(),FF.nodes(),DD.nodes(),r1,r2,r3)
plot_graph(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from syntheticThreeLayerGraph_l import synthetic_three_level, plot_graph
n1=n2=n3=50
p1=p2=p3=0.01
q1=q2=q3=0.01
G,J,FF,DD,edgeList = synthetic_three_level(n1,n2,n3,p1,p2,p3,q1,q2,q3,no_isolates=False)
pos=plot_graph(G,J,FF,DD,n1,n2,n3,d1=2,d2=3.,nodesize=50,withlabels=False,edgelist=edgeList,layout=False,b_alpha=0.25)
from threeLayerCommunityParition import create_node_comm_graph, plot_graph_stack
broken_graph,broken_partition,npartition = create_node_comm_graph(G,J.nodes(),FF.nodes(),DD.nodes())
plot_graph_stack(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from threeLayerConnComponentsPartition import create_node_conncomp_graph, plot_graph_stack
broken_graph,broken_partition,npartition = create_node_conncomp_graph(G,J.nodes(),FF.nodes(),DD.nodes())
plot_graph_stack(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from threeLayer3AttributesPartition import create_node_3attri_graph, plot_graph_stack
r1=r2=r3=0.333
broken_graph,broken_partition,npartition = create_node_3attri_graph(G,J.nodes(),FF.nodes(),DD.nodes(),r1,r2,r3)
plot_graph_stack(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from analyticThreeLayerGraph import analyticThreeLayerGraph, plot_graph
n = 150
p = 0.01
r1 = r2 = r3 = 0.333
G, layer1, layer2, layer3, edgeList = analyticThreeLayerGraph(n,p,r1,r2,r3,G_isolates=True)
plot_graph(G,layer1,layer2,layer3,d1=1.5,d2=5.,d3=0.8,nodesize=100,withlabels=False,edgelist=edgeList,layout=False,alpha=0.25)
from threeLayerCommunityParition import create_node_comm_graph, plot_graph
broken_graph,broken_partition,npartition = create_node_comm_graph(G,layer1,layer2,layer3)
plot_graph(G,broken_graph,broken_partition,npartition,layer1,layer2,layer3,d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from threeLayerConnComponentsPartition import create_node_conncomp_graph, plot_graph
broken_graph,broken_partition,npartition = create_node_conncomp_graph(G,layer1,layer2,layer3)
plot_graph(G,broken_graph,broken_partition,npartition,layer1,layer2,layer3,d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from threeLayer3AttributesPartition import create_node_3attri_graph, plot_graph
r1=r2=r3=0.333
broken_graph,broken_partition,npartition = create_node_3attri_graph(G,layer1,layer2,layer3,r1,r2,r3)
plot_graph(G,broken_graph,broken_partition,npartition,layer1,layer2,layer3,d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from analyticThreeLayerGraph_l import analyticThreeLayerGraph, plot_graph
n = 150
p = 0.01
r1 = 0.333
r2 = 0.333
r3 = 0.333
G, layer1, layer2, layer3, edgeList = analyticThreeLayerGraph(n,p,r1,r2,r3,G_isolates=True)
plot_graph(G,layer1,layer2,layer3,d1=3.5,d2=5.,d3=0.8,nodesize=100,withlabels=False,edgelist=edgeList,layout=False,alpha=0.2)
from threeLayerCommunityParition import create_node_comm_graph, plot_graph_stack
broken_graph,broken_partition,npartition = create_node_comm_graph(G,J.nodes(),FF.nodes(),DD.nodes())
plot_graph_stack(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from threeLayerConnComponentsPartition import create_node_conncomp_graph, plot_graph_stack
broken_graph,broken_partition,npartition = create_node_conncomp_graph(G,J.nodes(),FF.nodes(),DD.nodes())
plot_graph_stack(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from threeLayer3AttributesPartition import create_node_3attri_graph, plot_graph_stack
r1=r2=r3=0.333
broken_graph,broken_partition,npartition = create_node_3attri_graph(G,J.nodes(),FF.nodes(),DD.nodes(),r1,r2,r3)
plot_graph_stack(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
%matplotlib inline
from syntheticThreeLayerGraph_time import synthetic_three_level, plot_graph
p1=p2=p3=0.1
n=50
G,J,FF,DD,JFD,edgeList = synthetic_three_level(n,p1,p2,p3,J_isolates=True,F_isolates=True,D_isolates=True)
#print edgeList
created_pos=plot_graph(n,G,J,FF,DD,JFD,d1=2.,d2=3.,nodesize=50,withlabels=False,edgelist=edgeList,layout=False,b_alpha=0.05) #d=0.5 #d
from threeLayerCommunityParition import create_node_comm_graph, plot_graph_stack
broken_graph,broken_partition,npartition = create_node_comm_graph(G,J.nodes(),FF.nodes(),DD.nodes())
plot_graph_stack(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from threeLayerConnComponentsPartition import create_node_conncomp_graph, plot_graph_stack
broken_graph,broken_partition,npartition = create_node_conncomp_graph(G,J.nodes(),FF.nodes(),DD.nodes())
plot_graph_stack(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)
from threeLayer3AttributesPartition import create_node_3attri_graph, plot_graph_stack
r1=r2=r3=0.333
broken_graph,broken_partition,npartition = create_node_3attri_graph(G,J.nodes(),FF.nodes(),DD.nodes(),r1,r2,r3)
plot_graph_stack(G,broken_graph,broken_partition,npartition,J.nodes(),FF.nodes(),DD.nodes(),d1=1.4,d2=5.,d3=0.8,withlabels=False,nodesize=100,layout=False)